package com.acce.gxsc.common;

import android.os.Build;

import com.acce.gxsc.page.work.WorkActivity;
import com.acce.sdk.BaseApp;
import com.acce.sdk.BaseConstants;

/**
 * Created by huxley on 2017/5/24.
 */
public class App extends BaseApp {
    
    public static String dutyId;
    public static String gateName;
    public static String onTime;
    public static String gateNo;
    public static String currentOnTime;
    public static String currentPlace;
    public static boolean isDongGuanShiChang = true;
    public static boolean isDebug = false;
    static {
        BaseConstants.BaseConfig.IS_AUTO_LAYOUT_USE = false;
        BaseConstants.BaseConfig.IS_SMS_CODE_USE = true;
        BaseConstants.BaseConfig.IS_PERM_USE = false;
        BaseConstants.BaseConfig.IS_DEVICE_NUM_USE = false;
        BaseConstants.BaseConfig.IS_CRASH_REPORT_USE = false;

        BaseConstants.BaseConfig.CONTENT_AUTHORITY = "com.acce.iocard.searchhistorydatabase";
        BaseConstants.BaseUrl.SEA_FOOD_URL = "https://www.accesale.com/api/seafood";
        BaseConstants.BaseUrl.PERM_SERVICE = "https://www.accesale.com/api/permission";
        if (!"V1V1".equals(Build.DEVICE + Build.MODEL)) {

        }
        if(isDongGuanShiChang){
         //   http://ql-2016.oss-cn-qingdao.aliyuncs.com/download/gxfm/app-2.0.0.11.10.apk
            BaseConstants.BaseUrl.APP_UPGRADE_URL="http://ql-2016.oss-cn-qingdao.aliyuncs.com/download/gxfm/app";
            BaseConstants.BaseUrl.APP_UPGRADE_CONFIG_URL="https://guanxiang.app.accemarket.com//upload/app-config/config.json";
        }else {
            BaseConstants.BaseUrl.APP_UPGRADE_CONFIG_URL = "https://dev.accemarket.com/uploadfile/iocar/app/config.json";
            BaseConstants.BaseUrl.APP_UPGRADE_URL = "http://ql-2016.oss-cn-qingdao.aliyuncs.com/download/jnh/app/app";
        }
        //http://ql-2016.oss-cn-qingdao.aliyuncs.com/download/jnh/app/app-7.3.4.09.29.apk
        if (isDebug) {
            BaseConstants.BaseUrl.USER_SERVICE = "https://dev.accemarket.com/api/auth";
            BaseConstants.BaseUrl.SMS_MESSAGE = "https://dev.accemarket.com/sms/message";
        } else {
            if(isDongGuanShiChang){
                BaseConstants.BaseUrl.USER_SERVICE="https://guanxiang.app.accemarket.com/api/auth";
                BaseConstants.BaseUrl.SMS_MESSAGE= "https://guanxiang.app.accemarket.com/sms/message";
            }else {
                BaseConstants.BaseUrl.USER_SERVICE = "https://admin.accemarket.com/api/auth";
                BaseConstants.BaseUrl.SMS_MESSAGE =  "https://admin.accemarket.com/sms/message";
            }
        }
    }

    @Override
    public Class<?> getMainViewClass() {
        return WorkActivity.class;
    }
    @Override
    public void onCreate() {
        super.onCreate();
    }
}